package com.danke.lib.pay;

import android.text.TextUtils;

/**
 * @author wupuquan
 * @version 1.0
 * @since 2018/12/29 10:39
 */
public enum DKPayChannel {

    /**
     * 微信
     */
    WX("1"),
    /**
     * 支付宝
     */
    ALIPAY("2"),
    /**
     * 招行一卡通
     */
    CMB("3");

    private String channel;

    DKPayChannel(String channel) {
        this.channel = channel;
    }

    public String getChannel() {
        return channel;
    }

    public static boolean contains(String channel) {
        for (DKPayChannel dkPayChannel : DKPayChannel.values()) {
            if (TextUtils.equals(dkPayChannel.channel, channel)) {
                return true;
            }
        }
        return false;
    }
}
